<?php include template('common/head') ?>
<div class="mdui-container">
	<?php 
		if($dir['ccpParentFileId'] != 'root'){
	?>
    <div class="row">
		<div class="mdui-col">
			<div class="mdui-typo-subheading mdui-m-b-1 mdui-p-l-1 mdui-text-truncate">
				<a href="<?=$_CFG['url']?>/<?=$dir['parentId']?>" class="mdui-ripple"><i class="mdui-icon material-icons">arrow_back</i></a>
				<i class="mdui-icon material-icons mdui-m-r-1">folder_open</i><?=$dir['name']?></div>
    		<div class="mdui-divider mdui-m-b-2"></div>
		</div>
	</div>
	<?php
		}
	?>
	<div class="mdui-row mdui-m-t-2 mdui-p-l-2">

		<div class="mdui-col-xs-7">
			Name
		</div>
		<div class="mdui-col-xs-5 mdui-text-right mdui-p-r-3">
			Size
		</div>

	</div>
    <div class="mdui-list filelist">
    <?php
        foreach($panlist['data'] as $item){
            if($item['kind'] == 'folder'){
    ?>
        <a href="<?=$_CFG['url']?>/<?=$item['nodeId']?>" class="mdui-list-item mdui-ripple" style="width: 100%;display: block;line-height: 48px;">
            <div class="mdui-row">
                <div class="mdui-col-xs-12 mdui-text-truncate">
                    <i class="mdui-icon material-icons mdui-m-r-1">folder</i> <?=$item['name']?>
                </div>
            </div>
        </a>
    <?php 
            }else{

    ?>
        <a target="__blank" href="<?=$_CFG['url']?>/download/<?=$item['nodeId']?><?=isPreview($item['ext'])?>" class="mdui-list-item mdui-ripple" style="width: 100%;display: block;line-height: 48px;">
            <div class="mdui-row">
                <div class="mdui-col-xs-7 mdui-text-truncate">
                    <i class="mdui-icon material-icons mdui-m-r-1"><?=getFileicon($item['ext'])?></i> <?=$item['name']?>
                </div>
                <div class="mdui-col-xs-5 mdui-text-right">
                    <?=getSize($item['size'])?>
                </div>
            </div>
        </a>
    <?php
            }
        }
    ?>
    </div>
</div>
<?php include template('common/foot') ?>